#include "water_lamp.h"
#include <AT89X52.h>

void Port2_Close()
{
P2=0xff;
}

void Port2_0_Open()
{
P2_0=0x0;
}
void Port2_0_Close()
{
P2_0=0xff;
}

void Port2_1_Open()
{
P2_1=0x0;
}
void Port2_1_Close()
{
P2_1=0xff;
}

void Port2_2_Open()
{
P2_2=0x0;
}
void Port2_2_Close()
{
P2_2=0xff;
}


void Port2_3_Open()
{
P2_3=0x0;
}
void Port2_3_Close()
{
P2_3=0xff;
}


void Port2_4_Open()
{
P2_4=0x0;
}
void Port2_4_Close()
{
P2_4=0xff;
}


void Port2_5_Open()
{
P2_5=0x0;
}
void Port2_5_Close()
{
P2_5=0xff;
}


void Port2_6_Open()
{
P2_6=0x0;
}
void Port2_6_Close()
{
P2_6=0xff;
}


void Port2_7_Open()
{
P2_7=0x0;
}
void Port2_7_Close()
{
P2_7=0xff;
}



void water_lamp()
{
while(1)
{

Port2_Close();

Port2_0_Open();
Delay();
Port2_0_Close();
Delay();
Port2_1_Open();
Delay();
Port2_1_Close();
Delay();
Port2_2_Open();
Delay();
Port2_2_Close();
Delay();
Port2_3_Open();
Delay();
Port2_3_Close();
Delay();
Port2_4_Open();
Delay();
Port2_4_Close();
Delay();
Port2_5_Open();
Delay();
Port2_5_Close();
Delay();
Port2_6_Open();
Delay();
Port2_6_Close();
Delay();
Port2_7_Open();
Delay();
Port2_7_Close();
Delay();
}
}
